using FriendStar.Code;
using FriendStar.Domain.Entity.VBaseData;
using FriendStar.Domain.IRepository.VBaseData;
using FriendStar.Repository.VBaseData;
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace FriendStar.Application.VBaseData
{
    public class V_CPK_ZD_13_DatStoreDefineApp
    {
        private IV_CPK_ZD_13_DatStoreDefineRepository service = new V_CPK_ZD_13_DatStoreDefineRepository();
        public V_CPK_ZD_13_DatStoreDefineEntity GetEntity(string proCompanyNO,string productionNO)
        {
            string useUnit = Configs.GetValue("UseUnit");
            
            return service.IQueryable(p => p.UseUnit == useUnit && p.FProCompanyNO == proCompanyNO && p.FProductionNO == productionNO).Select(p => new V_CPK_ZD_13_DatStoreDefineEntity { FStoreNO = p.FStoreNO, FStoreName = p.FStoreName, FStoreSetNO = p.FStoreSetNO }).FirstOrDefault();
        }
    }
}
